package name.huzhenbo.java.patterns.observer;

class CRTMonitor implements Observer {
    private int hour;
    private int min;
    private int sec;

    public int getHour() {
        return hour;
    }

    public int getMin() {
        return min;
    }

    public int getSec() {
        return sec;
    }

    public void update(Observable observable) {
        hour = ((Clock) observable).getHour();
        min = ((Clock) observable).getMin();
        sec = ((Clock) observable).getSec();
    }
}
